Skip to content

Implement auto-open feature for browser launch on server start#276

Merged
cliffhall merged 19 commits into
modelcontextprotocol:mainfrom
moeki0:auto_open
May 12, 2025
Merged

Implement auto-open feature for browser launch on server start#276
cliffhall merged 19 commits into
modelcontextprotocol:mainfrom
moeki0:auto_open

Conversation

@moeki0
Copy link
Copy Markdown
Contributor

@moeki0 moeki0 commented Apr 7, 2025

Motivation and Context

This eliminates the manual step of copying URLs and opening browsers, making the development workflow more efficient.

How Has This Been Tested?

Tested on macOS environments with various browsers (Chrome, Firefox, Safari). Verified that the feature respects user configuration and can be disabled via configuration options.

Breaking Changes

No breaking changes. The feature is enabled by default but can be disabled through configuration.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the [MCP Documentation](https://modelcontextprotocol.io)
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Copy link
Copy Markdown
Member

@cliffhall cliffhall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested locally on Mac and it works ok, but a few things:

  • There are conflicts to be resolved as the branch is behind.
  • Yours launches with http://localhost rather than http://127.0.0.1 which we're using instead, to comply with OAuth requirements.
  • Along with new config items comes a form field requirement in the sidebar. We need an affordance to turn this feature off.
Screenshot 2025-04-11 at 4 42 34 PM

@cliffhall cliffhall added enhancement New feature request waiting on submitter Waiting for the submitter to provide more info labels Apr 11, 2025
@moeki0
Copy link
Copy Markdown
Contributor Author

moeki0 commented Apr 13, 2025

@cliffhall I've commited

@cliffhall
Copy link
Copy Markdown
Member

This is a double negative that made me have to think about its validity for a second. Could it instead be "Enable Browser Auto-open" and default to true?

Screenshot 2025-04-14 at 12 53 41 PM

@moeki0 moeki0 force-pushed the auto_open branch 3 times, most recently from 77d4050 to b09e982 Compare April 17, 2025 09:13
@moeki0
Copy link
Copy Markdown
Contributor Author

moeki0 commented Apr 17, 2025

@cliffhall Review please

Copy link
Copy Markdown
Member

@cliffhall cliffhall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @moekiorg. Looks good, operates perfectly. Need to do npm run prettier-fix though.

@cliffhall
Copy link
Copy Markdown
Member

cliffhall commented Apr 18, 2025

@cliffhall Review please

@kawakamidev It works fine for opening, but the UI configuration field doesn't change the behavior. If I set it to false then close the inspector, when I run the inspector again, it just auto launches.

@cliffhall
Copy link
Copy Markdown
Member

cliffhall commented Apr 30, 2025

@kawakamidev It works fine for opening, but the UI configuration field doesn't change the behavior. If I set it to false then close the inspector, when I run the inspector again, it just auto launches.

The problem here is that for this to work, the setting can't just be stored in the browser's local storage, it also has to write back to a locally stored configuration that will be consulted before the app launches next time. That's tough, since we don't currently have such a file and plumbing backwards from the client to write it would be a pain.

Perhaps we should trim this back to the place you originally had it. Just the auto-open, no UI affordance.

@moeki0
Copy link
Copy Markdown
Contributor Author

moeki0 commented May 4, 2025

OK

@moeki0
Copy link
Copy Markdown
Contributor Author

moeki0 commented May 4, 2025

@cliffhall I have reverted the changes!

Copy link
Copy Markdown
Member

@cliffhall cliffhall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a suggestion for the README wording.

Comment thread README.md Outdated
moeki0 and others added 2 commits May 7, 2025 23:20
Co-authored-by: Cliff Hall <cliff@futurescale.com>
cliffhall
cliffhall previously approved these changes May 8, 2025
Copy link
Copy Markdown
Member

@cliffhall cliffhall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kawakamidev Only one thing, it needs a prettier-fix run.

Copy link
Copy Markdown
Member

@cliffhall cliffhall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@cliffhall cliffhall merged commit ad39ec2 into modelcontextprotocol:main May 12, 2025
2 checks passed
IgnacioC44 referenced this pull request in MCPJam/inspector Jun 21, 2025
Implement auto-open feature for browser launch on server start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature request waiting on submitter Waiting for the submitter to provide more info

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants